﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<link href="../../Content/css/stylesMenu.css" rel="StyleSheet" type="text/css" media="screen" />
<div id="menu">
    <script src="../../Content/menu/stmenu.js" type="text/javascript"></script>
    <span>
        <script type="text/javascript">
            var menuids = ["treemenu1"] //Enter id(s) of SuckerTree UL menus, separated by commas
            function buildsubmenus_horizontal() {
                for (var i = 0; i < menuids.length; i++) {
                    var ultags = document.getElementById(menuids[i]).getElementsByTagName("ul")
                    for (var t = 0; t < ultags.length; t++) {
                        if (ultags[t].parentNode.parentNode.id == menuids[i]) { //if this is a first level submenu
                            ultags[t].style.top = ultags[t].parentNode.offsetHeight + "px" //dynamically position first level submenus to be height of main menu item
                            //ultags[t].parentNode.getElementsByTagName("a")[0].className = "mainfoldericon"
                        }
                        else { //else if this is a sub level menu (ul)
                            ultags[t].style.left = ultags[t - 1].getElementsByTagName("a")[0].offsetWidth + "px" //position menu to the right of menu item that activated it
                            ultags[t].parentNode.getElementsByTagName("a")[0].className = "subfoldericon"
                        }
                        ultags[t].parentNode.onmouseover = function () {
                            this.getElementsByTagName("ul")[0].style.visibility = "visible"
                        }
                        ultags[t].parentNode.onmouseout = function () {
                            this.getElementsByTagName("ul")[0].style.visibility = "hidden"
                        }
                    }
                }
            }
            if (window.addEventListener)
                window.addEventListener("load", buildsubmenus_horizontal, false)
            else if (window.attachEvent)
                window.attachEvent("onload", buildsubmenus_horizontal)
        </script>
    </span>
    <!-- #EndLibraryItem -->
    <div class="suckertreemenu">
        <ul id="treemenu1">
            <li class="test" id="HomeMenu"><a href="<%= Url.Action("Index","Default")%>" style="border-left: 0px solid black">
                Home</a> </li>
            <li class="test" id="JobMenu">Jobs<%--<a href="#" style="border-left: 0px solid black">Meetings</a>--%>
                <ul>
                    <li>
                        <%: Html.ActionLink("All Jobs", "GetAllJobs", "Job")%></li>
                    <%--  <li>
                         <%: Html.ActionLink("Gallery", "GetAllJobs", "Job")%></li>
                         <li>
                         <%: Html.ActionLink("Index", "GetAllJobs", "Job")%></li>--%>
                </ul>
            </li>           
            <li class="test" id="UserAdminMenu">User Mgt.
                <ul>
                <li>
                        <%: Html.ActionLink("Create User", "ViewUser", "UserAdministration", new { roleName = "Technical Officer", mode = "n" }, null)%></li>
                    <li>
                        <%: Html.ActionLink("View CSR Users", "ViewUsers", "UserAdministration",new{roleName="Technical Officer"},null)%></li>
                    <li>
                        <%: Html.ActionLink("View Web Administrators", "ViewUsers", "UserAdministration",new{roleName="Web Administrator"},null)%></li>
                    <li>
                        <%: Html.ActionLink("View Locked Users", "ViewLockedUsers", "UserAdministration")%></li>
                </ul>
            </li>
             <li class="test" id="ProfileMenu">Profile
                <ul>
                    <li>
                        <%: Html.ActionLink("Change Password", "ChangePassword", "LogOn")%></li>
                </ul>
            </li>
        </ul>
        <br style="clear: left;" />
    </div>
</div>
